package dilmaj.shared;

import com.google.gwt.user.client.rpc.IsSerializable;

import dilmaj.client.UserJDO;


public class UserVO implements IsSerializable {
	private String username;
	//private String password;
	private String email;
	private Long id;
	
	public UserVO(UserJDO userJDO) {
		id=userJDO.getId();
		
		if (userJDO.getUsername()==null)
			username="";
		else
			username=userJDO.getUsername();
		
		/*if (userJDO.getPassword()==null)
			password="";
		else
			password=userJDO.getPassword();*/
		
		if (userJDO.getEmail()==null)
			email="";
		else
			email=userJDO.getEmail();
	}
	
	public UserVO(String username, String password) {
		this.username=username;
		//this.password=password;
	}
	
	public UserVO(Long useid, String username) {
		this.username=username;
		this.id=useid;
	}
	
	public UserVO(Long id, String username, String password) {
		this.id=id;
		this.username=username;
		//this.password=password;
	}
	
	public UserVO() {
		
	}
	
	public String getUsername() {
		return username;
	}
	
	/*public String getPassword() {
		return password;
	}*/
	
	public String getEmail() {
		return email;
	}
	
	public Long getId() {
		return id;
	}
	
	public void setUsername(String username) {
		this.username=username;
	}
}
